package com.jingjiu.homeservicesapi.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单明细：支持一个订单多商品/食品对象 order_item
 * 
 * @author ruoyi
 * @date 2025-04-16
 */
public class OrderItem extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单明细ID */
    private Long id;

    /** 关联的订单ID */
    @Excel(name = "关联的订单ID")
    private Long orderId;

    /** 商品/食品名称 */
    @Excel(name = "商品/食品名称")
    private String productName;

    /** 购买数量 */
    @Excel(name = "购买数量")
    private Long quantity;

    /** 单价（可选） */
    @Excel(name = "单价", readConverterExp = "可=选")
    private BigDecimal price;

    /** 商品类型（如 餐饮、普通商品） */
    @Excel(name = "商品类型", readConverterExp = "如=,餐=饮、普通商品")
    private String itemType;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setOrderId(Long orderId) 
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }

    public void setProductName(String productName) 
    {
        this.productName = productName;
    }

    public String getProductName() 
    {
        return productName;
    }

    public void setQuantity(Long quantity) 
    {
        this.quantity = quantity;
    }

    public Long getQuantity() 
    {
        return quantity;
    }

    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }

    public void setItemType(String itemType) 
    {
        this.itemType = itemType;
    }

    public String getItemType() 
    {
        return itemType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderId", getOrderId())
            .append("productName", getProductName())
            .append("quantity", getQuantity())
            .append("price", getPrice())
            .append("itemType", getItemType())
            .toString();
    }
}
